package newcoder.huawei.lx_HJ1_字符串最后一个单词的长度;

import java.util.Scanner;

/**
 * @author Mr.wang
 * @date 2021/11/11
 */
public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String nextLine = scanner.nextLine();
            String[] split = nextLine.split(" ");
            System.out.println(split[split.length - 1].length());
        }
    }
}
